<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>
        let obj={
            name:'hug',
            age:20,
            sex:'n'
        }
        // 返回的是数组就可以用forEch,map等..
        console.log(Object.keys(obj));// ['name', 'age', 'sex']属性
        console.log(Object.values(obj));// ['hug', 20, 'n']值
        let ob={}
        Object.assign(ob,obj)
        console.log(ob);
    </script>
</body>
</html>